package com.adcc.loadsheet.billing.entity;

import com.adcc.loadsheet.billing.util.DateTimeUtil;
import com.adcc.loadsheet.billing.vo.ScUpDataEntityVO;

import java.util.Date;

/**
 * 舱单表实体类
 * Created by zhaoml on 2020/4/27.
 */
public class ScUpDataEntity extends BasisEntity<ScUpDataEntityVO> {
    private Integer id;             //舱单ID
    private String upType;          //舱单类型：LS舱单；PS名单
    private String airline;         //航空公司2字码
    private String content;             //舱单内容
    private Date createTime;        //舱单创建时间，实际为收到入库时间，主要使用时间
    private String customData;      //自定义数据，目前好像没什么用
    private String dataSource;      //数据来源，只有TRA，以前有长隆舱单，现在没有了
    private String des;                 //目的机场3字码
    private String fi;                  //航班号
    private String an;                      //机尾号
    private Integer lastAutoAckState;   //自动回复状态：1成功，2失败
    private Date lastAutoAckTime;       //自动回复时间
    private Integer lastManuAckState;   //机长回复状态：5确认，6拒绝
    private Date lastManuAckTime;       //机长回复时间
    private Integer locked;              //锁定状态：0未锁定，1锁定，和咱们关系不大，是地服系统防止重复发舱单用的
    private Integer sendNum;             //发送数量
    private Date sendTime;               //发送时间
    private String sendUserId;          //发送人
    private Integer state;              //舱单状态：0未发送，1已发送，-1已删除，删除和未发送舱单不做统计
    private Integer successNum;         //成功数量
    private String tko;                  //起飞机场3字码
    private String rawContent;          //舱单原始内容
    private Integer failNum;            //失败数量
    private String newContent;          //发送后的舱单内容，舱单发送后会根据发送人和机场不同添加些附件内容
    private String extendedPropertys;   //舱单的一些详细信息提取，如：货物重量等，与咱们无关
    private String Version;             //版本号
    private String modifyUserId;        //修改用户，当机场为换乘机场时，用户可能不想修改原始舱单，就会修改舱单起飞机场，这里记录下修改人，与咱们无关
    private Date modifyTime;            //修改时间
    private Date loadsheetBuildTime;        //舱单制作时间，这个时间是舱单制作人，制作舱单的时间，写在舱单中，咱们不使用
    private String PASSENGER_NO;        //旅客名单编号，名单可能有多个拆分，通过这个判断排序，对于咱们来说只关注1即可，后面的排序算一份名单，舱单没有这个属性没有内容

    //非数据库字段
    private Integer loadsheetnum;
    private Integer passgerlistnum;
    private String chsShortname;
    private String airportname;
    private String PB_NAME;
    private String repect;

    @Override
    public ScUpDataEntityVO toVO() {
        ScUpDataEntityVO vo = new ScUpDataEntityVO();
        vo.setId(this.id);
        vo.setUpType(this.upType);
        vo.setAirline(this.airline);
        vo.setContent(this.content);
        vo.setCreateTime(this.createTime);
        vo.setCustomData(this.customData);
        vo.setDataSource(this.dataSource);
        vo.setDes(this.des);
        vo.setFi(this.fi);
        vo.setAn(this.an);
        vo.setLastAutoAckState(this.lastAutoAckState);
        vo.setLastAutoAckTime(this.lastAutoAckTime);
        vo.setLastManuAckState(this.lastManuAckState);
        vo.setLastManuAckTime(this.lastManuAckTime);
        vo.setLocked(this.locked);
        vo.setSendNum(this.sendNum);
        vo.setSendTime(this.sendTime);
        vo.setSendUserId(this.sendUserId);
        vo.setState(this.state);
        vo.setSuccessNum(this.successNum);
        vo.setTko(this.tko);
        vo.setRawContent(this.rawContent);
        vo.setFailNum(this.failNum);
        vo.setNewContent(this.newContent);
        vo.setExtendedPropertys(this.extendedPropertys);
        vo.setVersion(this.Version);
        vo.setModifyUserId(this.modifyUserId);
        vo.setModifyTime(this.modifyTime);
        vo.setLoadsheetBuildTime(this.loadsheetBuildTime);
        vo.setPASSENGER_NO(this.PASSENGER_NO);
        //非数据库字段
        vo.setChsShortname(this.chsShortname);
        vo.setPB_NAME(this.PB_NAME);
        vo.setRepect(this.repect);
        return vo;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUpType() {
        return upType;
    }

    public void setUpType(String upType) {
        this.upType = upType;
    }

    public String getAirline() {
        return airline;
    }

    public void setAirline(String airline) {
        this.airline = airline;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCustomData() {
        return customData;
    }

    public void setCustomData(String customData) {
        this.customData = customData;
    }

    public String getDataSource() {
        return dataSource;
    }

    public void setDataSource(String dataSource) {
        this.dataSource = dataSource;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public String getFi() {
        return fi;
    }

    public void setFi(String fi) {
        this.fi = fi;
    }

    public String getAn() {
        return an;
    }

    public void setAn(String an) {
        this.an = an;
    }

    public Integer getLastAutoAckState() {
        return lastAutoAckState;
    }

    public void setLastAutoAckState(Integer lastAutoAckState) {
        this.lastAutoAckState = lastAutoAckState;
    }

    public Date getLastAutoAckTime() {
        return lastAutoAckTime;
    }

    public void setLastAutoAckTime(Date lastAutoAckTime) {
        this.lastAutoAckTime = lastAutoAckTime;
    }

    public Integer getLastManuAckState() {
        return lastManuAckState;
    }

    public void setLastManuAckState(Integer lastManuAckState) {
        this.lastManuAckState = lastManuAckState;
    }

    public Date getLastManuAckTime() {
        return lastManuAckTime;
    }

    public void setLastManuAckTime(Date lastManuAckTime) {
        this.lastManuAckTime = lastManuAckTime;
    }

    public Integer getLocked() {
        return locked;
    }

    public void setLocked(Integer locked) {
        this.locked = locked;
    }

    public Integer getSendNum() {
        return sendNum;
    }

    public void setSendNum(Integer sendNum) {
        this.sendNum = sendNum;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public String getSendUserId() {
        return sendUserId;
    }

    public void setSendUserId(String sendUserId) {
        this.sendUserId = sendUserId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getSuccessNum() {
        return successNum;
    }

    public void setSuccessNum(Integer successNum) {
        this.successNum = successNum;
    }

    public String getTko() {
        return tko;
    }

    public void setTko(String tko) {
        this.tko = tko;
    }

    public String getRawContent() {
        return rawContent;
    }

    public void setRawContent(String rawContent) {
        this.rawContent = rawContent;
    }

    public Integer getFailNum() {
        return failNum;
    }

    public void setFailNum(Integer failNum) {
        this.failNum = failNum;
    }

    public String getNewContent() {
        return newContent;
    }

    public void setNewContent(String newContent) {
        this.newContent = newContent;
    }

    public String getExtendedPropertys() {
        return extendedPropertys;
    }

    public void setExtendedPropertys(String extendedPropertys) {
        this.extendedPropertys = extendedPropertys;
    }

    public String getVersion() {
        return Version;
    }

    public void setVersion(String version) {
        Version = version;
    }

    public String getModifyUserId() {
        return modifyUserId;
    }

    public void setModifyUserId(String modifyUserId) {
        this.modifyUserId = modifyUserId;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getLoadsheetBuildTime() {
        return loadsheetBuildTime;
    }

    public void setLoadsheetBuildTime(Date loadsheetBuildTime) {
        this.loadsheetBuildTime = loadsheetBuildTime;
    }

    public String getPASSENGER_NO() {
        return PASSENGER_NO;
    }

    public void setPASSENGER_NO(String PASSENGER_NO) {
        this.PASSENGER_NO = PASSENGER_NO;
    }

    public Integer getLoadsheetnum() {
        return loadsheetnum;
    }

    public void setLoadsheetnum(Integer loadsheetnum) {
        this.loadsheetnum = loadsheetnum;
    }

    public Integer getPassgerlistnum() {
        return passgerlistnum;
    }

    public void setPassgerlistnum(Integer passgerlistnum) {
        this.passgerlistnum = passgerlistnum;
    }

    public String getChsShortname() {
        return chsShortname;
    }

    public void setChsShortname(String chsShortname) {
        this.chsShortname = chsShortname;
    }

    public String getPB_NAME() {
        return PB_NAME;
    }

    public void setPB_NAME(String PB_NAME) {
        this.PB_NAME = PB_NAME;
    }

    public String getRepect() {
        return repect;
    }

    public void setRepect(String repect) {
        this.repect = repect;
    }

    public String getAirportname() {
        return airportname;
    }

    public void setAirportname(String airportname) {
        this.airportname = airportname;
    }
}